import axios from 'axios';

const _address = {
    getAllAddress(resolve, reject) {
        axios.post("/address/getAddress.do")
            .then(function (res) {
                resolve(res.data.data);
            })
            .catch(function (error) {
                reject(error);
            });
    },
    updateLngLat(addressInfo, resolve, reject){
        axios.post("/address/updateLngLat.do", addressInfo)
            .then(function (res) {
                resolve(res.data.msg);
            })
            .catch(function (error) {
                reject(error);
            });
    }
};

export default _address;